package com.cencat.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户权限响应VO
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "用户权限响应")
public class UserPermissionVO {

    @Schema(description = "主键ID", example = "1")
    private Long id;

    @Schema(description = "用户ID", example = "1")
    private Long userId;

    @Schema(description = "用户名", example = "admin")
    private String username;

    @Schema(description = "用户昵称", example = "管理员")
    private String nickname;

    @Schema(description = "权限ID", example = "1")
    private Long permissionId;

    @Schema(description = "权限编码", example = "user:create")
    private String permissionCode;

    @Schema(description = "权限名称", example = "创建用户")
    private String permissionName;

    @Schema(description = "权限描述", example = "允许创建新用户")
    private String permissionDescription;

    @Schema(description = "权限类型", example = "MENU")
    private String permissionType;

    @Schema(description = "租户ID", example = "1")
    private Long tenantId;

    @Schema(description = "授权人ID", example = "1")
    private Long grantedBy;

    @Schema(description = "授权人姓名", example = "超级管理员")
    private String grantedByName;

    @Schema(description = "授权时间")
    private LocalDateTime grantedTime;

    @Schema(description = "权限过期时间")
    private LocalDateTime expireTime;

    @Schema(description = "是否已过期")
    private Boolean expired;

    @Schema(description = "状态：1-有效，0-无效", example = "1")
    private Integer status;

    @Schema(description = "状态描述", example = "有效")
    private String statusDesc;

    @Schema(description = "备注", example = "临时授权")
    private String remark;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建人", example = "1")
    private Long createBy;

    @Schema(description = "更新人", example = "1")
    private Long updateBy;
}